package cn.huiyunche.base.service.enums;

public enum UserTypeEnum {
    DRIVER(10, "司机"),
    OWNER(20, "货主"),
    COMPANY(30, "运输公司"),
    SCOMPANY(40, "托运公司"),
    SEND_DRIVER(50, "人送车"),
    CONSUMER(60, "分供方"),
    CONSUMER_DRIVER(70, "分供方司机");

    private final int value;
    private final String text;

    UserTypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static UserTypeEnum getByValue(int value) {
        for (UserTypeEnum temp : UserTypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
